﻿<%@ Page Title="Admin Console - Face Management" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="FaceIdPage.aspx.cs" Inherits="AdminConsole.FaceIdPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <div id="page-content-wrapper">
        <div class="container-fluid">
            <div class="row">
                <div class="col-lg-12">
                    <h1>Face ID List</h1>
                    <input type="text" id="searchbar" style="width:25%;" value="Search Face ID, User ID, or Username" onfocus="erase();" onblur="resetText();" />
                    <button type="button" class="btn-sm btn-default" onclick="faceSearch();"><span class="glyphicon glyphicon-search" aria-hidden="true"></span></button> <br />
                    <table id="faceList" border="1" style="margin-top:20px;">
                        <tr>
                            <th>Face ID</th>
                            <th>User ID</th>
                            <th>Username</th>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </div>

    <script type="text/javascript">

        $(document).ready(function () {
            getKeys();
            createFaceList();
        });

        function erase() {
            if (document.getElementById("searchbar").value == "Search Face ID, User ID, or Username")
                document.getElementById("searchbar").value = "";
        }
        function resetText() {
            if (document.getElementById("searchbar").value == "")
                document.getElementById("searchbar").value = "Search Face ID, User ID, or Username";
        }
        $("#searchbar").keypress(function (e) {
            if (e.keyCode == 13) {
                faceSearch();
            }
        });

    </script>

</asp:Content>
